package com.sdry.service.jyy;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sdry.mapper.jyy.DispatchMapper;
import com.sdry.model.jyy.Dispatch;
import com.sdry.model.jyy.DispatchExample;
import com.sdry.model.llm.Department;
import com.sdry.model.llm.User;

@Service
@Transactional
public class DispatchServiseImpl implements DispatchServise{

	@Resource
	private DispatchMapper dispatchMapper;
	
	@Override
	public int countByExample(DispatchExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByExample(DispatchExample example) {
		return 0;
	}

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return 0;
	}

	@Override
	public int insert(Dispatch record) {
		return dispatchMapper.insert(record);
	}

	@Override
	public int insertSelective(Dispatch record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Dispatch> selectByExampleWithBLOBs(DispatchExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Dispatch> selectByExample(DispatchExample example) {
		return dispatchMapper.selectByExample(example);
	}

	@Override
	public List<Dispatch> selectByExampleWithBLOBsForStartPage(
			DispatchExample example, Integer pageNum, Integer pageSize) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Dispatch> selectByExampleForStartPage(DispatchExample example,
			Integer pageNum, Integer pageSize) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Dispatch> selectByExampleWithBLOBsForOffsetPage(
			DispatchExample example, Integer offset, Integer limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Dispatch> selectByExampleForOffsetPage(DispatchExample example,
			Integer offset, Integer limit) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Dispatch selectFirstByExample(DispatchExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Dispatch selectFirstByExampleWithBLOBs(DispatchExample example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Dispatch selectByPrimaryKey(Integer id) {
		return null;
	}

	@Override
	public Dispatch selectByPrimaryKey(Long id) {
		return dispatchMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByExampleSelective(Dispatch record, DispatchExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByExampleWithBLOBs(Dispatch record, DispatchExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByExample(Dispatch record, DispatchExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKeySelective(Dispatch record) {
		return dispatchMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKeyWithBLOBs(Dispatch record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKey(Dispatch record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByPrimaryKeys(String ids) {
		int afact = 0;
		String[] split = ids.split(",");
		for (String s : split) {
			Long id = Long.valueOf(s);
			afact = dispatchMapper.deleteByPrimaryKey(id);
		}
		return afact;
	}

	@Override
	public int deleteByPrimaryKeys2(String ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void initMapper() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<Department> selectDepartment() {
		return dispatchMapper.selectDepartment();
	}

	@Override
	public List<User> selectUser() {
		return dispatchMapper.selectUser();
	}

	@Override
	public String queryDepartmentLeder(String name) {
		return dispatchMapper.queryDepartmentLeder(name);
	}

}
